<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span>
</span><span id="line-2"></span><span class="hs-comment">-- (those who have too heavy dependencies for GHC.Tc.Types.Evidence)</span><span>
</span><span id="line-3"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Tc.Types.EvTerm</span><span>
</span><span id="line-4"></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Tc.Types.EvTerm.html#evDelayedError"><span class="hs-identifier">evDelayedError</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Tc.Types.EvTerm.html#evCallStack"><span class="hs-identifier">evCallStack</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-5"></span><span class="hs-keyword">where</span><span>
</span><span id="line-6"></span><span>
</span><span id="line-7"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-8"></span><span>
</span><span id="line-9"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html"><span class="hs-identifier">GHC.Data.FastString</span></a></span><span>
</span><span id="line-10"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Type.html"><span class="hs-identifier">GHC.Core.Type</span></a></span><span>
</span><span id="line-11"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.html"><span class="hs-identifier">GHC.Core</span></a></span><span>
</span><span id="line-12"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Make.html"><span class="hs-identifier">GHC.Core.Make</span></a></span><span>
</span><span id="line-13"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Literal.html"><span class="hs-identifier">GHC.Types.Literal</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Literal.html#Literal"><span class="hs-identifier">Literal</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-14"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Tc.Types.Evidence.html"><span class="hs-identifier">GHC.Tc.Types.Evidence</span></a></span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html"><span class="hs-identifier">GHC.Driver.Types</span></a></span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Unit.html"><span class="hs-identifier">GHC.Unit</span></a></span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Utils.html"><span class="hs-identifier">GHC.Core.Utils</span></a></span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Names.html"><span class="hs-identifier">GHC.Builtin.Names</span></a></span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html"><span class="hs-identifier">GHC.Types.SrcLoc</span></a></span><span>
</span><span id="line-22"></span><span>
</span><span id="line-23"></span><span class="hs-comment">-- Used with Opt_DeferTypeErrors</span><span>
</span><span id="line-24"></span><span class="hs-comment">-- See Note [Deferring coercion errors to runtime]</span><span>
</span><span id="line-25"></span><span class="hs-comment">-- in GHC.Tc.Solver</span><span>
</span><span id="line-26"></span><span class="annot"><a href="GHC.Tc.Types.EvTerm.html#evDelayedError"><span class="hs-identifier hs-type">evDelayedError</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.Evidence.html#EvTerm"><span class="hs-identifier hs-type">EvTerm</span></a></span><span>
</span><span id="line-27"></span><span id="evDelayedError"><span class="annot"><span class="annottext">evDelayedError :: Type -&gt; FastString -&gt; EvTerm
</span><a href="GHC.Tc.Types.EvTerm.html#evDelayedError"><span class="hs-identifier hs-var hs-var">evDelayedError</span></a></span></span><span> </span><span id="local-6989586621680956360"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680956360"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span id="local-6989586621680956359"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680956359"><span class="hs-identifier hs-var">msg</span></a></span></span><span>
</span><span id="line-28"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">EvExpr -&gt; EvTerm
</span><a href="GHC.Tc.Types.Evidence.html#EvExpr"><span class="hs-identifier hs-var">EvExpr</span></a></span><span> </span><span class="annot"><span class="annottext">(EvExpr -&gt; EvTerm) -&gt; EvExpr -&gt; EvTerm
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-29"></span><span>    </span><span class="annot"><span class="annottext">Id -&gt; EvExpr
forall b. Id -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680956356"><span class="hs-identifier hs-var">errorId</span></a></span><span> </span><span class="annot"><span class="annottext">EvExpr -&gt; [Type] -&gt; EvExpr
forall b. Expr b -&gt; [Type] -&gt; Expr b
</span><a href="GHC.Core.html#mkTyApps"><span class="hs-operator hs-var">`mkTyApps`</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Type -&gt; Type
Type -&gt; Type
</span><a href="GHC.Core.Type.html#getRuntimeRep"><span class="hs-identifier hs-var">getRuntimeRep</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680956360"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680956360"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">EvExpr -&gt; [EvExpr] -&gt; EvExpr
forall b. Expr b -&gt; [Expr b] -&gt; Expr b
</span><a href="GHC.Core.html#mkApps"><span class="hs-operator hs-var">`mkApps`</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">EvExpr
forall {b}. Expr b
</span><a href="#local-6989586621680956352"><span class="hs-identifier hs-var">litMsg</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-30"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-31"></span><span>    </span><span id="local-6989586621680956356"><span class="annot"><span class="annottext">errorId :: Id
</span><a href="#local-6989586621680956356"><span class="hs-identifier hs-var hs-var">errorId</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="GHC.Core.Make.html#tYPE_ERROR_ID"><span class="hs-identifier hs-var">tYPE_ERROR_ID</span></a></span><span>
</span><span id="line-32"></span><span>    </span><span id="local-6989586621680956352"><span class="annot"><span class="annottext">litMsg :: Expr b
</span><a href="#local-6989586621680956352"><span class="hs-identifier hs-var hs-var">litMsg</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Literal -&gt; Expr b
forall b. Literal -&gt; Expr b
</span><a href="GHC.Core.html#Lit"><span class="hs-identifier hs-var">Lit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; Literal
</span><a href="GHC.Types.Literal.html#LitString"><span class="hs-identifier hs-var">LitString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; ByteString
</span><a href="GHC.Data.FastString.html#bytesFS"><span class="hs-identifier hs-var">bytesFS</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680956359"><span class="hs-identifier hs-var">msg</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-33"></span><span>
</span><span id="line-34"></span><span class="hs-comment">-- Dictionary for CallStack implicit parameters</span><span>
</span><span id="line-35"></span><span id="local-6989586621680956400"><span class="annot"><a href="GHC.Tc.Types.EvTerm.html#evCallStack"><span class="hs-identifier hs-type">evCallStack</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Types.html#MonadThings"><span class="hs-identifier hs-type">MonadThings</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680956400"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unit.Module.html#HasModule"><span class="hs-identifier hs-type">HasModule</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680956400"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#HasDynFlags"><span class="hs-identifier hs-type">HasDynFlags</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680956400"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span>
</span><span id="line-36"></span><span>    </span><span class="annot"><a href="GHC.Tc.Types.Evidence.html#EvCallStack"><span class="hs-identifier hs-type">EvCallStack</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680956400"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="GHC.Tc.Types.Evidence.html#EvExpr"><span class="hs-identifier hs-type">EvExpr</span></a></span></span><span>
</span><span id="line-37"></span><span class="hs-comment">-- See Note [Overview of implicit CallStacks] in GHC.Tc.Types.Evidence</span><span>
</span><span id="line-38"></span><span id="evCallStack"><span class="annot"><span class="annottext">evCallStack :: forall (m :: * -&gt; *).
(MonadThings m, HasModule m, HasDynFlags m) =&gt;
EvCallStack -&gt; m EvExpr
</span><a href="GHC.Tc.Types.EvTerm.html#evCallStack"><span class="hs-identifier hs-var hs-var">evCallStack</span></a></span></span><span> </span><span id="local-6989586621680956323"><span class="annot"><span class="annottext">EvCallStack
</span><a href="#local-6989586621680956323"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-39"></span><span>  </span><span id="local-6989586621680956322"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680956322"><span class="hs-identifier hs-var">df</span></a></span></span><span>            </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-40"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680956320"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621680956320"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Platform
</span><a href="GHC.Driver.Session.html#targetPlatform"><span class="hs-identifier hs-var hs-var">targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680956322"><span class="hs-identifier hs-var">df</span></a></span><span>
</span><span id="line-41"></span><span>  </span><span id="local-6989586621680956318"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680956318"><span class="hs-identifier hs-var">m</span></a></span></span><span>             </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m Module
forall (m :: * -&gt; *). HasModule m =&gt; m Module
</span><a href="GHC.Unit.Module.html#getModule"><span class="hs-identifier hs-var">getModule</span></a></span><span>
</span><span id="line-42"></span><span>  </span><span id="local-6989586621680956316"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680956316"><span class="hs-identifier hs-var">srcLocDataCon</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Name -&gt; m DataCon
forall (m :: * -&gt; *). MonadThings m =&gt; Name -&gt; m DataCon
</span><a href="GHC.Driver.Types.html#lookupDataCon"><span class="hs-identifier hs-var">lookupDataCon</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Builtin.Names.html#srcLocDataConName"><span class="hs-identifier hs-var">srcLocDataConName</span></a></span><span>
</span><span id="line-43"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680956298"><span class="annot"><span class="annottext">mkSrcLoc :: RealSrcSpan -&gt; f EvExpr
</span><a href="#local-6989586621680956298"><span class="hs-identifier hs-var hs-var">mkSrcLoc</span></a></span></span><span> </span><span id="local-6989586621680956297"><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621680956297"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [EvExpr] -&gt; EvExpr
</span><a href="GHC.Core.Make.html#mkCoreConApps"><span class="hs-identifier hs-var">mkCoreConApps</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680956316"><span class="hs-identifier hs-var">srcLocDataCon</span></a></span><span> </span><span class="annot"><span class="annottext">([EvExpr] -&gt; EvExpr) -&gt; f [EvExpr] -&gt; f EvExpr
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span>
</span><span id="line-44"></span><span>               </span><span class="annot"><span class="annottext">[f EvExpr] -&gt; f [EvExpr]
forall (t :: * -&gt; *) (m :: * -&gt; *) a.
(Traversable t, Monad m) =&gt;
t (m a) -&gt; m (t a)
</span><a href="../../base/src/Data.Traversable.html#sequence"><span class="hs-identifier hs-var">sequence</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; f EvExpr
forall (m :: * -&gt; *). MonadThings m =&gt; FastString -&gt; m EvExpr
</span><a href="GHC.Core.Make.html#mkStringExprFS"><span class="hs-identifier hs-var">mkStringExprFS</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Unit -&gt; FastString
</span><a href="GHC.Unit.Types.html#unitFS"><span class="hs-identifier hs-var">unitFS</span></a></span><span> </span><span class="annot"><span class="annottext">(Unit -&gt; FastString) -&gt; Unit -&gt; FastString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Unit
forall unit. GenModule unit -&gt; unit
</span><a href="GHC.Unit.Types.html#moduleUnit"><span class="hs-identifier hs-var hs-var">moduleUnit</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680956318"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-45"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; f EvExpr
forall (m :: * -&gt; *). MonadThings m =&gt; FastString -&gt; m EvExpr
</span><a href="GHC.Core.Make.html#mkStringExprFS"><span class="hs-identifier hs-var">mkStringExprFS</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName -&gt; FastString
</span><a href="GHC.Unit.Module.Name.html#moduleNameFS"><span class="hs-identifier hs-var">moduleNameFS</span></a></span><span> </span><span class="annot"><span class="annottext">(ModuleName -&gt; FastString) -&gt; ModuleName -&gt; FastString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; ModuleName
forall unit. GenModule unit -&gt; ModuleName
</span><a href="GHC.Unit.Types.html#moduleName"><span class="hs-identifier hs-var hs-var">moduleName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680956318"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-46"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; f EvExpr
forall (m :: * -&gt; *). MonadThings m =&gt; FastString -&gt; m EvExpr
</span><a href="GHC.Core.Make.html#mkStringExprFS"><span class="hs-identifier hs-var">mkStringExprFS</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RealSrcSpan -&gt; FastString
</span><a href="GHC.Types.SrcLoc.html#srcSpanFile"><span class="hs-identifier hs-var hs-var">srcSpanFile</span></a></span><span> </span><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621680956297"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-47"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">EvExpr -&gt; f EvExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(EvExpr -&gt; f EvExpr) -&gt; EvExpr -&gt; f EvExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Int -&gt; EvExpr
</span><a href="GHC.Core.Make.html#mkIntExprInt"><span class="hs-identifier hs-var">mkIntExprInt</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680956320"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RealSrcSpan -&gt; Int
</span><a href="GHC.Types.SrcLoc.html#srcSpanStartLine"><span class="hs-identifier hs-var">srcSpanStartLine</span></a></span><span> </span><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621680956297"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-48"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">EvExpr -&gt; f EvExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(EvExpr -&gt; f EvExpr) -&gt; EvExpr -&gt; f EvExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Int -&gt; EvExpr
</span><a href="GHC.Core.Make.html#mkIntExprInt"><span class="hs-identifier hs-var">mkIntExprInt</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680956320"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RealSrcSpan -&gt; Int
</span><a href="GHC.Types.SrcLoc.html#srcSpanStartCol"><span class="hs-identifier hs-var">srcSpanStartCol</span></a></span><span> </span><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621680956297"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-49"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">EvExpr -&gt; f EvExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(EvExpr -&gt; f EvExpr) -&gt; EvExpr -&gt; f EvExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Int -&gt; EvExpr
</span><a href="GHC.Core.Make.html#mkIntExprInt"><span class="hs-identifier hs-var">mkIntExprInt</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680956320"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RealSrcSpan -&gt; Int
</span><a href="GHC.Types.SrcLoc.html#srcSpanEndLine"><span class="hs-identifier hs-var">srcSpanEndLine</span></a></span><span> </span><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621680956297"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-50"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">EvExpr -&gt; f EvExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(EvExpr -&gt; f EvExpr) -&gt; EvExpr -&gt; f EvExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Int -&gt; EvExpr
</span><a href="GHC.Core.Make.html#mkIntExprInt"><span class="hs-identifier hs-var">mkIntExprInt</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680956320"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RealSrcSpan -&gt; Int
</span><a href="GHC.Types.SrcLoc.html#srcSpanEndCol"><span class="hs-identifier hs-var">srcSpanEndCol</span></a></span><span> </span><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621680956297"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-51"></span><span>                        </span><span class="hs-special">]</span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span>  </span><span id="local-6989586621680956282"><span class="annot"><span class="annottext">EvExpr
</span><a href="#local-6989586621680956282"><span class="hs-identifier hs-var">emptyCS</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Id -&gt; EvExpr
forall b. Id -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">(Id -&gt; EvExpr) -&gt; m Id -&gt; m EvExpr
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; m Id
forall (m :: * -&gt; *). MonadThings m =&gt; Name -&gt; m Id
</span><a href="GHC.Driver.Types.html#lookupId"><span class="hs-identifier hs-var">lookupId</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Builtin.Names.html#emptyCallStackName"><span class="hs-identifier hs-var">emptyCallStackName</span></a></span><span>
</span><span id="line-54"></span><span>
</span><span id="line-55"></span><span>  </span><span id="local-6989586621680956279"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680956279"><span class="hs-identifier hs-var">pushCSVar</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Name -&gt; m Id
forall (m :: * -&gt; *). MonadThings m =&gt; Name -&gt; m Id
</span><a href="GHC.Driver.Types.html#lookupId"><span class="hs-identifier hs-var">lookupId</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Builtin.Names.html#pushCallStackName"><span class="hs-identifier hs-var">pushCallStackName</span></a></span><span>
</span><span id="line-56"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680956277"><span class="annot"><span class="annottext">pushCS :: EvExpr -&gt; EvExpr -&gt; EvExpr -&gt; EvExpr
</span><a href="#local-6989586621680956277"><span class="hs-identifier hs-var hs-var">pushCS</span></a></span></span><span> </span><span id="local-6989586621680956276"><span class="annot"><span class="annottext">EvExpr
</span><a href="#local-6989586621680956276"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621680956275"><span class="annot"><span class="annottext">EvExpr
</span><a href="#local-6989586621680956275"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621680956274"><span class="annot"><span class="annottext">EvExpr
</span><a href="#local-6989586621680956274"><span class="hs-identifier hs-var">rest</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-57"></span><span>        </span><span class="annot"><span class="annottext">EvExpr -&gt; [EvExpr] -&gt; EvExpr
</span><a href="GHC.Core.Make.html#mkCoreApps"><span class="hs-identifier hs-var">mkCoreApps</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; EvExpr
forall b. Id -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680956279"><span class="hs-identifier hs-var">pushCSVar</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">[EvExpr] -&gt; EvExpr
</span><a href="GHC.Core.Make.html#mkCoreTup"><span class="hs-identifier hs-var">mkCoreTup</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">EvExpr
</span><a href="#local-6989586621680956276"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">EvExpr
</span><a href="#local-6989586621680956275"><span class="hs-identifier hs-var">loc</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">EvExpr
</span><a href="#local-6989586621680956274"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680956264"><span class="annot"><span class="annottext">mkPush :: FastString -&gt; RealSrcSpan -&gt; EvExpr -&gt; m EvExpr
</span><a href="#local-6989586621680956264"><span class="hs-identifier hs-var hs-var">mkPush</span></a></span></span><span> </span><span id="local-6989586621680956263"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680956263"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621680956262"><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621680956262"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621680956261"><span class="annot"><span class="annottext">EvExpr
</span><a href="#local-6989586621680956261"><span class="hs-identifier hs-var">tm</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-60"></span><span>        </span><span id="local-6989586621680956260"><span class="annot"><span class="annottext">EvExpr
</span><a href="#local-6989586621680956260"><span class="hs-identifier hs-var">nameExpr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; m EvExpr
forall (m :: * -&gt; *). MonadThings m =&gt; FastString -&gt; m EvExpr
</span><a href="GHC.Core.Make.html#mkStringExprFS"><span class="hs-identifier hs-var">mkStringExprFS</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680956263"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-61"></span><span>        </span><span id="local-6989586621680956259"><span class="annot"><span class="annottext">EvExpr
</span><a href="#local-6989586621680956259"><span class="hs-identifier hs-var">locExpr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RealSrcSpan -&gt; m EvExpr
forall {f :: * -&gt; *}. MonadThings f =&gt; RealSrcSpan -&gt; f EvExpr
</span><a href="#local-6989586621680956298"><span class="hs-identifier hs-var">mkSrcLoc</span></a></span><span> </span><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621680956262"><span class="hs-identifier hs-var">loc</span></a></span><span>
</span><span id="line-62"></span><span>        </span><span class="hs-comment">-- at this point tm :: IP sym CallStack</span><span>
</span><span id="line-63"></span><span>        </span><span class="hs-comment">-- but we need the actual CallStack to pass to pushCS,</span><span>
</span><span id="line-64"></span><span>        </span><span class="hs-comment">-- so we use unwrapIP to strip the dictionary wrapper</span><span>
</span><span id="line-65"></span><span>        </span><span class="hs-comment">-- See Note [Overview of implicit CallStacks]</span><span>
</span><span id="line-66"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680956258"><span class="annot"><span class="annottext">ip_co :: CoercionR
</span><a href="#local-6989586621680956258"><span class="hs-identifier hs-var hs-var">ip_co</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; CoercionR
</span><a href="GHC.Tc.Types.Evidence.html#unwrapIP"><span class="hs-identifier hs-var">unwrapIP</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EvExpr -&gt; Type
</span><a href="GHC.Core.Utils.html#exprType"><span class="hs-identifier hs-var">exprType</span></a></span><span> </span><span class="annot"><span class="annottext">EvExpr
</span><a href="#local-6989586621680956261"><span class="hs-identifier hs-var">tm</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-67"></span><span>        </span><span class="annot"><span class="annottext">EvExpr -&gt; m EvExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EvExpr -&gt; EvExpr -&gt; EvExpr -&gt; EvExpr
</span><a href="#local-6989586621680956277"><span class="hs-identifier hs-var">pushCS</span></a></span><span> </span><span class="annot"><span class="annottext">EvExpr
</span><a href="#local-6989586621680956260"><span class="hs-identifier hs-var">nameExpr</span></a></span><span> </span><span class="annot"><span class="annottext">EvExpr
</span><a href="#local-6989586621680956259"><span class="hs-identifier hs-var">locExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EvExpr -&gt; CoercionR -&gt; EvExpr
forall b. Expr b -&gt; CoercionR -&gt; Expr b
</span><a href="GHC.Core.html#Cast"><span class="hs-identifier hs-var">Cast</span></a></span><span> </span><span class="annot"><span class="annottext">EvExpr
</span><a href="#local-6989586621680956261"><span class="hs-identifier hs-var">tm</span></a></span><span> </span><span class="annot"><span class="annottext">CoercionR
</span><a href="#local-6989586621680956258"><span class="hs-identifier hs-var">ip_co</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-68"></span><span>
</span><span id="line-69"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">EvCallStack
</span><a href="#local-6989586621680956323"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-70"></span><span>    </span><span class="annot"><a href="GHC.Tc.Types.Evidence.html#EvCsPushCall"><span class="hs-identifier hs-type">EvCsPushCall</span></a></span><span> </span><span id="local-6989586621680956253"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680956253"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621680956252"><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621680956252"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621680956251"><span class="annot"><span class="annottext">EvExpr
</span><a href="#local-6989586621680956251"><span class="hs-identifier hs-var">tm</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; RealSrcSpan -&gt; EvExpr -&gt; m EvExpr
forall {m :: * -&gt; *}.
MonadThings m =&gt;
FastString -&gt; RealSrcSpan -&gt; EvExpr -&gt; m EvExpr
</span><a href="#local-6989586621680956264"><span class="hs-identifier hs-var">mkPush</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; FastString
</span><a href="GHC.Types.Name.Occurrence.html#occNameFS"><span class="hs-identifier hs-var hs-var">occNameFS</span></a></span><span> </span><span class="annot"><span class="annottext">(OccName -&gt; FastString) -&gt; OccName -&gt; FastString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680956253"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621680956252"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">EvExpr
</span><a href="#local-6989586621680956251"><span class="hs-identifier hs-var">tm</span></a></span><span>
</span><span id="line-71"></span><span>    </span><span class="annot"><span class="annottext">EvCallStack
</span><a href="GHC.Tc.Types.Evidence.html#EvCsEmpty"><span class="hs-identifier hs-var">EvCsEmpty</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">EvExpr -&gt; m EvExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">EvExpr
</span><a href="#local-6989586621680956282"><span class="hs-identifier hs-var">emptyCS</span></a></span><span>
</span><span id="line-72"></span></pre></body></html>